
/**
 * Excel reader 
 * Read from the folder and iterate
 */

/*var parseXlsx = require('excel');

exports.uploadFile = function(file, callback) {
	file = "sample.xlsx";
	parseXlsx(file, function(err, data) {
		if (err) throw err;
		else {
			console.log(data);
		}
		callback(null, data);
	});
};*/

var XLSX = require('xlsx');

/*var xlsx = XLSX.readFile(__dirname+'/suzuki.xlsx');

var sheet_name_list = xlsx.SheetNames;
var result = {};

xlsx.SheetNames.forEach(function(y){
	for(z in xlsx.Sheets[y]) {

		if (z[0] === '!') continue;

		var roa = XLSX.utils.sheet_to_row_object_array(xlsx.Sheets[y]);

        if(roa.length > 0){
                result[y] = roa;
        }

        console.log(result);
		console.log(roa.length);
	}
});*/